package com.zhl.block5;

public class Student {
    static int num = 80;
    static String name;
    //静态代码块
    static{
        System.out.println("静态代码块执行了");
        name = "加油！";
    }


    public Student(){
        System.out.println("无参数构造方法执行了");
    }
    //实例代码块
    {
        System.out.println("实例代码块执行了");
    }



    public Student(String name){
        System.out.println("有参数构造方法执行了");
    }



}
